define(['zepto', 'hammer'], function() {
	var choiceLi = $(".choice-li");
	var choiceF = $('.choice-f');
	console.info($(window).height()); //浏览器当前窗口可视区域高度
	console.info($(document).height());
	console.info( $(window).scrollTop())
	choiceLi.each(function(i, v) {
		new Hammer(v).on('tap', function(e) {
			clearInterval(aa);
			if(choiceF[i].style.display === 'block') {
				choiceF[i].style.display = 'none';
			} else {
				for(var j = 0; j < choiceF.length; j++) {
					if(i === j) {
						choiceF[j].style.display = 'block';
					} else {
						choiceF[j].style.display = 'none';
					}
				}
			}
			var aa = setInterval(function() {
				var winHeight=$(window).height();
				var docHeight=$(document).height();
				var scrolltops = $(window).scrollTop();
				var a = $(".choice-li")[i].offsetTop;
				var speed = Math.floor((a - scrolltops) / 2);
				scrollBy(0, speed);
				if(speed === 0) {
					clearInterval(aa);
				}
				if(docHeight-(winHeight+scrolltops)<=0){
					clearInterval(aa);
				}
			}, 30)

		})
	})
})